/// BaseUrl 枚举类
/// 参数1：apiName ==API名称
/// 参数2：apiUrl ==API接口基础路径
class ApiHost {
  /// 默认的API基础请求路径的下标 ///
  static const int API_IP_INDEX = 1;

  //正式环境
  static const String API_PRODUCTION = "http://124.71.100.215:6096/";

  //180-测试环境
  static const String API_TEST_180 = "http://59.56.255.180:6096/";

  //李凯
  static const String API_TEST_LK = "http://192.168.150.9:8096/";

  //廖荣兴
  static const String API_TEST_LRX = "http://192.168.150.35:8096/";

  //周振翔
  static const String API_TEST_ZZX = "http://192.168.150.20:8095/";

  //陈懋燊
  static const String API_TEST_CMS = "http://192.168.150.18:8096/";

  static String getIndex(int index) {
    switch (index) {
      case 0:
        return API_PRODUCTION;
      case 1:
        return API_TEST_180;
      case 2:
        return API_TEST_LK;
      case 3:
        return API_TEST_LRX;
      case 4:
        return API_TEST_ZZX;
      case 5:
        return API_TEST_CMS;
      default:
        return API_PRODUCTION;
    }
  }
}

///接口  参数
class HttpConfig {
  /// 密钥，获取短信验证码的sign签名加密密钥 ///
  static const String PASS_KEY = "78f19bb6c7db25f6";

  /// ================================ START http请求相关参数 ================================  ///

  /// ================================ END http请求相关参数 ================================ ///

  /// ================================ START 接口路径 前缀定义标识 ================================  ///

  /// 前端服务器路由 ///
  static const String API_PORTAL = "portal";

  /// im路由 ///
  static const String API_IM = "ims";

  /// 直播路由 ///
  static const String API_VIDEO = "video";

  /// 搜索路由 ///
  static const String API_SEARCH = "search";

  /// ================================ END 接口路径 前缀定义标识 ================================ ///

  /// ================================ START 公共/通用模块 API ================================  ///

  /// 主页 获取最新app 版本信息 ///
  static const String URL_HOME_LATEST_VERSION =
      "$API_PORTAL/version/latestVersion";

  /// 获取退款原因 字典 ///
  static const String URL_DICT_RETURN_REASON =
      "$API_PORTAL/dict/getReturnReasons";

  /// 字典 ///
  static const String URL_DICT_LIST = "$API_PORTAL/dict/list";

  /// GET 权限字典 ///
  static const String URL_USER_PERMISSIONS =
      "$API_PORTAL/AuthorityManagement/getAuthDic";

  /// 图片上传 - 批量文件上传 ///
  static const String URL_IMG_UPLOADS = "$API_PORTAL/dfs/uploads";

  /// 图片上传 - 单文件上传 ///
  static const String URL_IMG_UPLOAD = "$API_PORTAL/dfs/upload";

  /// 数据埋点 - 营销阅读数埋点 ///
  static const String URL_HOME_MARKETINGREADINGS =
      "$API_PORTAL/home/marketingReadings";

  /// ================================ END 公共/通用模块 API ================================ ///

  /// ================================ START 用户模块 API ================================  ///
//登录接口
  static const String URL_USER_LOGIN = "$API_PORTAL/sso/login";

//快捷登录：手机验证码登录
  static const String URL_USER_LOGIN_QUICK =
      "$API_PORTAL/sso/loginByTelephoneAuthCode";

//快捷登录：邮箱登录
  static const String URL_USER_LOGIN_BY_EMAIL =
      "$API_PORTAL/sso/loginByEmailAuthCode";

//GET请求 获取验证码
  static const String URL_USER_GET_VER_CODE = "$API_PORTAL/sso/getAuthCode";

//GET请求 获取邮箱验证码
  static const String URL_USER_GET_EMAIL_VER_CODE =
      "$API_PORTAL/sso/getEmailAuthCode";

//注册
  static const String URL_USER_REGISTER = "$API_PORTAL/sso/register";

//邮箱注册
  static const String URL_USER_REGISTER_BY_EMAIL =
      "$API_PORTAL/sso/registerByEmail";

//重置密码第一步
  static const String URL_USER_UPDATE_PW_CHECK =
      "$API_PORTAL/sso/verifyAuthCode";

//重置密码第二步
  static const String URL_USER_UPDATE_PW = "$API_PORTAL/sso/updatePassword";

//POST 切换角色
  static const String URL_USER_SWITCH_ROLES = "$API_PORTAL/sso/switchRoles";

  /// ================================ END 用户模块 API ================================ ///

  /// ================================ START 店铺详情页 API ================================  ///
//店铺信息
  static const String URL_STORE_DATETAIL = "$API_PORTAL/store/detail";

//分类
  static const String URL_STORE_CLASSIFY = "$API_PORTAL/store/classify";

//动态
  static const String URL_STORE_DYNAMICLIST = "$API_PORTAL/store/dynamicList";

//商品列表
  static const String URL_STORE_PRODUCTLIST = "$API_PORTAL/store/productList";

//新品列表
  static const String URL_STORE_NEWPRODUCTLIST =
      "$API_PORTAL/store/newProductList";

  /// ================================ END 商品详情页 API ================================ ///

  /// ================================ START 商品详情页 API ================================  ///
//详情
  static const String URL_COMMODITY_DATETAIL =
      "$API_PORTAL/product/sso/detail/";

//收藏
  static const String URL_COMMODITY_COLLECTIBLE =
      "$API_PORTAL/product/collectible";

//喜欢
  static const String URL_COMMODITY_LIKE = "$API_PORTAL/product/like";

//购物车
  static const String URL_ADD_CART = "$API_PORTAL/cart/add";

  /// ================================ END 商品详情页 API ================================ ///

  /// ================================ START 评价 API ================================  ///
//评价列表
  static const String URL_COMMENT_COMMENTLIST =
      "$API_PORTAL/comment/commentList";

//评价点赞
  static const String URL_COMMENT_ADDCOLLECT = "$API_PORTAL/comment/addCollect";

  /// ================================ END 评价 API ================================ ///

  /// ================================ START 搜索 API ================================  ///

//搜索列表
  static const String URL_PRODUCT_SEARCH = "$API_PORTAL/product/search";

  /// ================================ END 搜索 API ================================ ///

  /// ================================ START 购物车 API ================================  ///
//购物车列表
  static const String URL_CART_LIST = "$API_PORTAL/cart/list";

//删除购物车商品
  static const String URL_CART_DELETE = "$API_PORTAL/cart/delete";

//移商品入收藏
  static const String URL_CART_MOVE = "$API_PORTAL/cart/moveCollectible";

//修改商品数量
  static const String URL_CART_QUANTITY = "$API_PORTAL/cart/update/quantity";

  /// ================================ END 购物车 API ================================ ///

  /// ================================ START 订单模块 API ================================  ///

//提交
  static const String URL_ORDER_CONFIRMORDER =
      "$API_PORTAL/order/generateConfirmOrder";

//通过订单支付
  static const String URL_TRADE_PAY = "$API_PORTAL/trade/pay";

//确认订单（生成订单）
  static const String URL_ORDER_GENERATEORDER =
      "$API_PORTAL/order/generateOrder";

//支付结果查询
  static const String URL_ORDER_PAYMENTCONFIRMATION =
      "$API_PORTAL/trade/paymentConfirmation";

//开发票
  static const String URL_BILL_CREATEBILL = "$API_PORTAL/bill/createBill";

//POST 发票绑定订单
  static const String URL_BILL_BINDING_ORDER_ID = "$API_PORTAL/bill/binding";

//获取旧信息 (查询当前用户发票模板)
  static const String URL_BILL_GETBILL = "$API_PORTAL/bill/getBill";

//POST查看发票
  static const String URL_BILL_GETORDERBILL = "$API_PORTAL/bill/getOrderBill";

//POST发票发送邮箱
  static const String URL_BILL_SENDEMAIL = "$API_PORTAL/bill/sendEmail";

//获取订单列表
  static const String URL_ORDER_LIST = "$API_PORTAL/order/getOrder";

//获取订单详情
  static const String URL_ORDER_DETAIL = "$API_PORTAL/order/getOrderDetail";

//修改收货地址
  static const String URL_ORDER_UPDATE_RECE_ADDRESS =
      "$API_PORTAL/order/updateOrderAddress";

//获取退款售后的订单详情
  static const String URL_ORDER_DETAIL_RETURN =
      "$API_PORTAL/order/getReturnOrderDetail";

//对公转账详情
  static const String URL_ORDER_PUBLIC_TRANSFER_DETAIL =
      "$API_PORTAL/order/publicTransferOrderDetail";

//提醒商家确认
  static const String URL_ORDER_REMIND_MERCHANT =
      "$API_PORTAL/order/remindMerchant";

//获取申请退款信息
  static const String URL_ORDER_RETURNAPPLY_RETURN =
      "$API_PORTAL/returnApply/toReturnApply";

//提交申请退款
  static const String URL_ORDER_RETURNAPPLY_CREATE =
      "$API_PORTAL/returnApply/create";

//退货页面信息输入
  static const String URL_ORDER_RETURNAPPLY_PAGE_INFO =
      "$API_PORTAL/returnApply/returnPageInformation";

//修改退款申请
  static const String URL_ORDER_RETURNAPPLY_UPDATE =
      "$API_PORTAL/returnApply/update";

//撤销申请退款
  static const String URL_ORDER_RETURNAPPLY_CANCEL =
      "$API_PORTAL/order/cancelReturnOrder";

//获取协商历史
  static const String URL_ORDER_NEGO_HISTORY_LIST = "$API_PORTAL/nego/list";

//取消订单
  static const String URL_ORDER_CANCEL = "$API_PORTAL/order/cancelUserOrder";

//下架商品-取消待付款订单
  static const String URL_SOLDOUTCANCELUSERORDER_CANCEL =
      "$API_PORTAL/order/soldOutCancelUserOrder";

//订单确认收获
  static const String URL_ORDER_CONFIRM_RECEIVE =
      "$API_PORTAL/order/confirmReceiveOrder";

//删除订单
  static const String URL_ORDER_DELETE = "$API_PORTAL/order/deleteOrder";

//删除退款售后订单
  static const String URL_ORDER_REFUND_DELETE =
      "$API_PORTAL/order/deleteReturnOrder";

//获取 添加评价的信息
  static const String URL_ORDER_COMMENT_COMMENTRETURN =
      "$API_PORTAL/comment/commentReturn";

//添加评价
  static const String URL_ORDER_COMMENT_ADDCOMMENT =
      "$API_PORTAL/comment/addComment";

//GET 根据订单号查询物流信息
  static const String URL_GET_LOGIS_DETAIL = "$API_PORTAL/logistics/info";

//GET 合作物流接口
  static const String URL_GET_LOGIS_COMBINE =
      "$API_PORTAL/logistics/combineLogistics";

  /// ================================ END 订单模块 API ================================ ///

  /// ================================ START 首页模块 API ================================  ///

  /// 获取首页 头部包含的内容数据接口 ///
  static const String URL_HOME_CONTENT = "$API_PORTAL/home/content";

  /// 推荐 - 商品分类接口 ///
  static const String URL_HOME_GOODS_CATEGORY_LIST =
      "$API_PORTAL/home/productCateList";

  /// 推荐 - 商品列表接口 ///
  static const String URL_HOME_REC_GOODS_LIST =
      "$API_PORTAL/home/recommendProductList";

  /// 关注-店铺列表接口 ///
  static const String URL_HOME_FOL_SHOP_LIST =
      "$API_PORTAL/home/attentionStoreList";

  /// 关注 - 关注店铺接口 ///
  static const String URL_HOME_FOL_SHOP =
      "$API_PORTAL/member/attention/store/add";

  /// 取消关注 - 关注店铺接口 ///
  static const String URL_ATTENTION_STORE_DELETE =
      "$API_PORTAL/member/attention/store/delete";

  /// 推荐 - 人气推荐的商品列表接口 ///
  static const String URL_HOME_HOT_GOODS_LIST =
      "$API_PORTAL/home/hotProductList";

  /// 推荐 - 新品推荐的商品列表接口 ///
  static const String URL_HOME_NEW_GOODS_LIST =
      "$API_PORTAL/home/newProductList";

  /// ================================ END 首页模块 API ================================ ///

  /// ================================ START 发现模块 API ================================  ///

  static const String URL_SHORT_VIDEO_ASSOCIATED_PRODUCT =
      "$API_PORTAL/shortVideo/associatedProduct"; //POST 关联产品搜索
  static const String URL_SHORT_VIDEO_ASSOCIATED_PRODUCT_DRAFT =
      "$API_PORTAL/shortVideo/associatedProductDraft"; //POST 关联产品草稿收藏状态,1为收藏，0为未收藏
  static const String URL_SHORT_VIDEO_ATTENTION_LIST =
      "$API_PORTAL/shortVideo/attentionList"; //GET用户关注列表
  static const String URL_SHORT_VIDEO_COLLECTION =
      "$API_PORTAL/shortVideo/collection"; //GET关注UP主
  static const String URL_SHORT_VIDEO_COMMENTS =
      "$API_PORTAL/shortVideo/comments"; //POST 评论

  static const String URL_SHORT_VIDEO_GET_UPLOAD_PATH =
      "$API_PORTAL/shortVideo/getUploadPath"; //POST 获取上传路径
  static const String URL_SHORT_VIDEO_GIVE_LIKE =
      "$API_PORTAL/shortVideo/giveLike"; //GET 点赞

  static const String URL_SHORT_VIDEO_ONESELF_BY_LIST =
      "$API_PORTAL/shortVideo/oneself/memberByList"; //GET 当前用户个人 短视频列表
  static const String URL_SHORT_VIDEO_ONESELF_DETAIL =
      "$API_PORTAL/shortVideo/oneself/memberDetail"; //GET 当前用户个人信息展示
  static const String URL_SHORT_VIDEO_SAME_PRODUCT_LIST =
      "$API_PORTAL/shortVideo/sameProductList"; //GET 同款商品列表
  static const String URL_SHORT_VIDEO_DELETE =
      "$API_PORTAL/shortVideo/delShortVideo"; //GET 删除短视频接口-待定

  static const String URL_SHORT_VIDEO_GET_AUTO_TOKEN =
      "$API_PORTAL/shortVideo/getAutoToken"; //POST 获取视频上传相关参数
  static const String URL_SHORT_VIDEO_UPLOAD_CONFIRMATION =
      "$API_PORTAL/shortVideo/uploadConfirmation"; //POST 上传确认保存数据
  static const String URL_SHORT_VIDEO_UPLOAD_LIKE_LIST =
      "$API_PORTAL/shortVideo/likeList"; //GET 我喜欢的内容接口
  static const String URL_SHORT_VIDEO_REPORT =
      "$API_PORTAL/shortVideo/report"; //POST 视频举报

//sso为不需要登录的接口
  static const String URL_SHORT_VIDEO_COMMENTS_REPLY_SHOW =
      "$API_PORTAL/shortVideo/sso/commentsReplyShow"; //GET 消息回复展示
  static const String URL_SHORT_VIDEO_COMMENTS_SHOW =
      "$API_PORTAL/shortVideo/sso/commentsShow"; //GET 消息展示
  static const String URL_SHORT_VIDEO_SSO_LIST =
      "$API_PORTAL/shortVideo/sso/list"; //GET 推荐 短视频列表
  static const String URL_SHORT_VIDEO_MEMBER_BY_LIST =
      "$API_PORTAL/shortVideo/sso/memberByList"; //GET 短视频UP主 短视频列表
  static const String URL_SHORT_VIDEO_MEMBER_DETAIL =
      "$API_PORTAL/shortVideo/sso/memberDetail"; //GET 短视频UP个人信息展示
  static const String URL_SHORT_VIDEO_PLAY_VIDEO =
      "$API_PORTAL/shortVideo/sso/playVideo"; //GET 播放次数
  static const String URL_SHORT_VIDEO_PLAY_BY_VIDEO_ID =
      "$API_PORTAL/shortVideo/sso/playByVideoId"; //GET 短视频个人中心列表点击跳转播放 短视频列表

  /// ================================ END 发现模块 API ================================ ///

  /// ================================ START 消息模块 API ================================  ///

  /// ================================ END 消息模块 API ================================ ///

  /// ================================ START 我的 个人中心模块 API ================================  ///

  static const String URL_MY_INFO = "$API_PORTAL/my/myPage"; //我的信息接口
  static const String URL_MY_GETMEMBER = "$API_PORTAL/my/getMember"; //获取会员信息
  static const String URL_MY_UPDATEINFO = "$API_PORTAL/my/updateInfo"; //个人资料编辑
  static const String URL_MY_UPDATE_PASSWORD =
      "$API_PORTAL/my/updatePassword"; //POST 修改密码
  static const String URL_MEMBER_FEEDBACK =
      "$API_PORTAL/member/feedback/brand/add"; //修改意见
  static const String URL_MY_RECOMMEND_PRODUCT_LIST =
      "$API_PORTAL/my/newProductList"; //我的页面 推荐商品
  static const String URL_MY_ADDRESS_LIST =
      "$API_PORTAL/member/address/list"; //GET 地址管理
  static const String URL_MY_ADDRESS_DETAIL =
      "$API_PORTAL/member/address/detail"; //GET 地址详情
  static const String URL_MY_ADDRESS_ADD =
      "$API_PORTAL/member/address/add"; //POST 地址新增
  static const String URL_MY_ADDRESS_DELETE =
      "$API_PORTAL/member/address/delete"; //POST 地址删除
  static const String URL_MY_ADDRESS_UPDATE =
      "$API_PORTAL/member/address/update"; //POST 地址修改
  static const String URL_MY_ADDRESS_SET_DEF =
      "$API_PORTAL/member/address/defaultAddress"; //POST 设置默认地址

  /// ================================ END 我的 个人中心模块 API ================================ ///

  /// ================================ START 组织架构管理 API ================================ ///

  static const String URL_IM_GET_COLLEAGUE =
      "$API_PORTAL/Organ/getColleague"; //POST同事查询
  static const String URL_IM_GET_ORGAN =
      "$API_PORTAL/Organ/getOrgan"; //POST获取组织架构
  static const String URL_IM_ORGAN_REMARK =
      "$API_PORTAL/Organ/setRemark"; //POST设置备注
  /// ================================ START 组织架构管理 API ================================ ///

  /// ================================ END 对公账户管理  API ================================ ///

  static const String URL_PUB_ACC_ADD =
      "$API_PORTAL/pubAcc/addBasePubAcc"; //POST对公账户添加

  static const String URL_PUB_ACC_DELETE =
      "$API_PORTAL/pubAcc/delete"; //GET删除对公账户

  static const String URL_PUB_ACC_LIST = "$API_PORTAL/pubAcc/list"; //GET对公账户列表

  static const String URL_PUB_ACC_UPDATE =
      "$API_PORTAL/pubAcc/updateBasePubAcc"; //POST对公账户编辑

  /// ================================ END 对公账户管理  API ================================ ///

  /// ================================ START IM 即时通讯 API ================================  ///

  static const String URL_IM_GET_USERSIG =
      "$API_PORTAL/im/getUserSig"; //@GET 获取用户的userId和userSig

  static const String URL_IM_GET_CUSTOMER =
      "$API_PORTAL/im/getCustomer"; //@GET 获取聊天用户的userInfo

  static const String URL_IM_GET_BY_PHONE =
      "$API_PORTAL/im/getUserIdByPhone"; //@GET 手机号添加好友

  static const String URL_IM_GET_USER_DETAIL =
      "$API_PORTAL/im/getUserDetail"; //@GET 获取用户信息

  static const String URL_IM_GET_QR_CODE =
      "$API_PORTAL/im/getQRCode"; //@GET 个人二维码

  static const String URL_IM_GET_SYS_MSG =
      "$API_PORTAL/im/getSysMessage"; //@GET 获取系统消息

  static const String URL_IM_GET_PANTONE_COLORS =
      "$API_PORTAL/im/getPantoneColorLists"; //@GET 获取色卡数据

  static const String URL_IM_SEARCH_PANTONE_COLORS =
      "$API_PORTAL/im/searchPantoneColor"; //@GET 搜索色卡数据

  static const String URL_IM_SET_MESSAGE_READ =
      "$API_PORTAL/im/setMessageRead"; //@GET 设置系统消息已读

  static const String URL_IM_GET_GROUP_QR_CODE =
      "$API_PORTAL/im/getGroupQRCode"; //@GET 群二维码

  static const String URL_IM_GET_FRIEND_DETAIL =
      "$API_PORTAL/im/getFriendDetail"; //@GET 获取指定好友信息

  static const String URL_IM_GROUP_REPORT =
      "$API_PORTAL/im/groupReport"; //@POST 群投诉

  static const String URL_GET_LATEST_MESSAGE_INFO =
      "$API_PORTAL/im/getMessage"; //@GET 获取App 最新的消息统计信息

  /// ================================ END IM 即时通讯 API ================================ ///

  /// ================================ START 店铺关注管理 API ================================  ///

  static const String URL_MEMBER_ATTENTION_STORE_ADD =
      "$API_PORTAL/member/attention/store/add"; //POST 添加店铺关注

  static const String URL_MEMBER_ATTENTION_STORE_DELETE =
      "$API_PORTAL/member/attention/store/delete"; //POST 取消店铺关注

  static const String URL_MEMBER_ATTENTION_STORE_LIST =
      "$API_PORTAL/member/attention/storeList"; //POST 显示店铺关注列表

  /// ================================ END 店铺关注管理 API  ================================  ///

  /// ================================ START 会员收藏管理 API ================================  ///

  static const String URL_MEMBER_PRODUCT_COLLECTION_CANCEL =
      "$API_PORTAL/member/productCollection/cancel"; //POST 批量取消收藏

  static const String URL_MEMBER_PRODUCT_COLLECTION_ClEAR =
      "$API_PORTAL/member/productCollection/clear"; //POST 清空收藏列表

  static const String URL_MEMBER_PRODUCT_COLLECTION_DELETE =
      "$API_PORTAL/member/productCollection/delete"; //POST 删除收藏商品

  static const String URL_MEMBER_PRODUCT_COLLECTION_LIST =
      "$API_PORTAL/member/productCollection/list"; //POST 显示收藏列表

  /// ================================ END 会员收藏管理 API  ================================  ///

  /// ================================ START 浏览记录 API ================================  ///

  static const String URL_MEMBER_READ_HISTORY_LIST =
      "$API_PORTAL/member/readHistory/list"; //GET 分页获取用户浏览记录

  static const String URL_MEMBER_READ_HISTORY_DELETE =
      "$API_PORTAL/member/readHistory/delete"; //POST 删除浏览记录

  static const String URL_MEMBER_READ_HISTORY_CREATE =
      "$API_PORTAL/member/readHistory/create"; //POST 创建浏览记录

  static const String URL_MEMBER_READ_HISTORY_CLEAR =
      "$API_PORTAL/member/readHistory/clear"; //POST 清空浏览记录

  /// ================================ END 浏览记录 API ================================ ///

  /// ================================ START 直播拉流端 播放端 API ================================  ///

  static const String URL_PULL_LIVE_LIST =
      "$API_VIDEO/live/liveList"; //GET 直播列表
  static const String URL_PULL_LIVE_COMMON_COUNT =
      "$API_VIDEO/live/getCommonCount"; //GET 获取直播间点赞数/橱窗商品数
  static const String URL_PULL_LIVE_ADD_LIKE =
      "$API_VIDEO/live/addLike"; //POST 直播间点赞
  static const String URL_PULL_LIVE_IS_FOCUS =
      "$API_VIDEO/live/focusOnLive"; //POST 是否关注直播间
  static const String URL_PULL_LIVE_PRODUCT_LIST =
      "$API_VIDEO/live/getProductList"; //GET 获取直播间上架商品列表
  static const String URL_PULL_LIVE_STATUS =
      "$API_VIDEO/live/getLiveStatus"; //GET 获取直播状态
  static const String URL_PULL_LIVE_REPORT =
      "$API_VIDEO/live/liveReport"; //POST 直播举报

  /// ================================ END 直播拉流端 播放端 API ================================ ///

  /// ================================ START 直播推流 主播 API ================================  ///

  static const String URL_PUSH_LIVE_ADDPRODUCT =
      "$API_VIDEO/live/addProduct"; //POST  直播间上架商品

  static const String URL_PUSH_LIVE_CLOSELIVE =
      "$API_VIDEO/live/closeLive"; //POST    结束直播后清空缓存数据

  static const String URL_PUSH_LIVE_DELPRODUCT =
      "$API_VIDEO/live/delProduct"; //POST /live/delProduct 直播间删除商品

  static const String URL_PUSH_LIVE_GETUPPRODUCTLIST =
      "$API_VIDEO/live/getProductList"; //GET /live/getProductList 获取直播间上架商品列表

  static const String URL_PUSH_LIVE_GETPRODUCTLIST =
      "$API_VIDEO/live/getStoreProductList"; //GET /live/getProductList 获取商品列表

  /// ================================ END 直播推流 主播 API ================================ ///

  /// ======================================================== 商家版 API ============================================== ///

  /// ================================ START 店铺 API ================================  ///
//获取黑白店铺信息
  static const String URL_MERCHANTSVERSIONSTORE_BLACKWHITEDATETAIL =
      "$API_PORTAL/merchantsVersionStore/blackWhiteDetail";

//店铺信息
  static const String URL_MERCHANTSVERSIONSTORE_DATETAIL =
      "$API_PORTAL/merchantsVersionStore/detail";

//分类
  static const String URL_MERCHANTSVERSIONSTORE_CLASSIFY =
      "$API_PORTAL/merchantsVersionStore/classify";

//动态
  static const String URL_MERCHANTSVERSIONSTORE_DYNAMICLIST =
      "$API_PORTAL/merchantsVersionStore/dynamicList";

//商品列表
  static const String URL_MERCHANTSVERSIONSTORE_PRODUCTLIST =
      "$API_PORTAL/merchantsVersionStore/productList";

//新品列表
  static const String URL_MERCHANTSVERSIONSTORE_NEWPRODUCTLIST =
      "$API_PORTAL/merchantsVersionStore/newProductList";
  static const String URL_MERCHANTSVERSIONSTORE_PRODUCTSEARCH =
      "$API_PORTAL/merchantsVersionStore/productSearch";

  /// ================================ END 店铺 API ================================  ///

  /// ================================ START 营销-动态 API ================================  ///
//商户版动态评论列表
  static const String URL_MERCHANTSMARKETINGCONTROLLER_GETPRODUCTCOMMENT =
      "$API_PORTAL/MerchantsMarketingController/getProductComment";

//商户版动态工作台
  static const String URL_MERCHANTSMARKETINGCONTROLLER_DYNAMICTABLE =
      "$API_PORTAL/MerchantsMarketingController/dynamicTable";

//商户版全部动态列表
  static const String URL_MERCHANTSMARKETINGCONTROLLER_ALLOPERATIONLIST =
      "$API_PORTAL/MerchantsMarketingController/allOperationList";

//关联产品搜索
  static const String URL_MERCHANTSMARKETINGCONTROLLER_ASSOCIATEDPRODUCT =
      "$API_PORTAL/MerchantsMarketingController/associatedProduct";

//新增买家秀展示
  static const String URL_MERCHANTSMARKETINGCONTROLLER_CREATECOMMENTSHOW =
      "$API_PORTAL/MerchantsMarketingController/createCommentShow";

// 新增新品上新
  static const String URL_MERCHANTSMARKETINGCONTROLLER_CREATENEWPRODUCT =
      "$API_PORTAL/MerchantsMarketingController/createNewProduct";

//短视频
//商户版动态列表
  static const String
      URL_MERCHANTSMARKETINGCONTROLLER_PERSONALCENTERSHORTVIDEO =
      "$API_PORTAL/MerchantsMarketingController/personalCenterShortVideo";

//商户版短视频消息页顶部数据
  static const String
      URL_MERCHANTSMARKETINGCONTROLLER_INFORMATIONSHORTVIDEOHEAD =
      "$API_PORTAL/MerchantsMarketingController/informationShortVideoHead";

//商户版短视频消息页数据
  static const String
      URL_MERCHANTSMARKETINGCONTROLLER_INFORMATIONSHORTVIDEOLIST =
      "$API_PORTAL/MerchantsMarketingController/informationShortVideoList";

//商户版短视频消息页详情数据
  static const String
      URL_MERCHANTSMARKETINGCONTROLLER_INFORMATIONSHORTVIDEODETAIL =
      "$API_PORTAL/MerchantsMarketingController/informationShortVideoDetail";

//商户版短视频消息页详情 回复
  static const String URL_MERCHANTSMARKETINGCONTROLLER_COMMENTS =
      "$API_PORTAL/MerchantsMarketingController/comments";

//商户版短视频播放列表
  static const String URL_MERCHANTSMARKETINGCONTROLLER_PLAY_BY_VIDEO_ID =
      "$API_PORTAL/MerchantsMarketingController/sso/playByVideoId"; //短视频列表

//商户版同款商品
  static const String
      URL_MERCHANTSMARKETINGCONTROLLER_SHORT_VIDEO_SAME_PRODUCT_LIST =
      "$API_PORTAL/MerchantsMarketingController/sameProductList"; //同款商品

//商户版删除短视频
  static const String URL_MERCHANTSMARKETINGCONTROLLER_DEL_SHORT_VIDEO =
      "$API_PORTAL/MerchantsMarketingController/delShortVideo";

//商户版获取视频上传token
  static const String URL_MERCHANTSMARKETINGCONTROLLER_GET_AUTO_TOKEN =
      "$API_PORTAL/MerchantsMarketingController/getAutoToken";

//商户版视频上传信息绑定
  static const String URL_MERCHANTSMARKETINGCONTROLLER_UPLOAD_CONFIRMATION =
      "$API_PORTAL/MerchantsMarketingController/uploadConfirmation";

  /// ================================ END 营销-动态 API ================================  ///

  /// ================================ START 资金中心 API ================================  ///
//资金分析
  static const String URL_MERCHANTSMARKETINGCONTROLLER_MONEYANALYSE =
      "$API_PORTAL/MerchantsMoneyCenterController/moneyAnalyse";

//资金中心
  static const String URL_MERCHANTSMARKETINGCONTROLLER_MONEYHOME =
      "$API_PORTAL/MerchantsMoneyCenterController/moneyHome";

  /// ================================ END 资金中心 API ================================  ///

  /// ================================ START 商品详情 API ================================  ///
//详情
  static const String URL_MERCHANTSVERSIONPRODUCT_DATETAIL =
      "$API_PORTAL/merchantsVersionProduct/detail";

  /// ================================ END 商品详情 API ================================  ///

  /// ================================ START 商户版·协商历史管理  API ================================  ///

//协商历史列表 GET
  static const String URL_MERCHANT_NEGO_HISTORY_LIST =
      "$API_PORTAL/MerchantsNegoHistory/list";

  /// ================================ END  商户版·协商历史管理 API ================================  ///

  /// ================================ START 商户版·订单退货申请管理  API ================================  ///

//获取退货申请详情 GET
  static const String URL_MERCHANTS_RETURNAPPLY_DETAIL =
      "$API_PORTAL/merchants/returnApply/{id}";

//获取退货地址列表 GET
  static const String URL_MERCHANTS_RETURNAPPLY_GETSTOREADDRESS =
      "$API_PORTAL/merchants/returnApply/getStoreAddress";

//分页查询退货申请 GET
  static const String URL_MERCHANTS_RETURNAPPLY_LIST =
      "$API_PORTAL/merchants/returnApply/list";

//退款审批 POST
  static const String URL_MERCHANTS_RETURNAPPLY_UPDATE_STATUS =
      "$API_PORTAL/merchants/returnApply/update/status";

  /// ================================ END 商户版·订单退货申请管理 API  ================================  ///

  /// ================================ START 商户版·商品评价管理 API  ================================  ///

//评价列表 POST
  static const String URL_MERCHANTSCOMMENT_COMMENTLIST =
      "$API_PORTAL/MerchantsComment/commentList";

//评价回复 POST
  static const String URL_MERCHANTSCOMMENT_COMMENTREPLAY =
      "$API_PORTAL/MerchantsComment/commentReplay";

//商品评价详情 POST
  static const String URL_MERCHANTSCOMMENT_GETCOMMENT =
      "$API_PORTAL/MerchantsComment/getComment";

//订单详情评价 卖家评价买家 POST
  static const String URL_MERCHANTSCOMMENT_ADD_COMMENT =
      "$API_PORTAL/MerchantsComment/addComment";

//订单详情评价 获取待评价订单商品列表
  static const String URL_MERCHANTSCOMMENT_COMMENT_RETURN =
      "$API_PORTAL/MerchantsComment/commentReturn";

  /// ================================ END 商户版·商品评价管理 API ================================  ///

  ///***********************************START 商家版-商品管理 API**************************************///

//上架 下架  0上架 1下架  GET
  static const String URL_MERCHANTSVERSIONPRODUCT_CHANGE_SALE =
      "$API_PORTAL/merchantsVersionProduct/changeSale";

//批量 上架 下架  0上架 1下架 GET
  static const String URL_MERCHANTSVERSIONPRODUCT_CHANGE_SALE_Batch =
      "$API_PORTAL/merchantsVersionProduct/changeSaleBatch";

//批量删除商品  GET
  static const String URL_MERCHANTSVERSIONPRODUCT_DEL_PRODUCT_BATCH =
      "$API_PORTAL/merchantsVersionProduct/delProductBatch";

//出售 仓库总数 GET
  static const String URL_MERCHANTSVERSIONPRODUCT_PRODUCT_AMOUNT =
      "$API_PORTAL/merchantsVersionProduct/productAmount";

//获取商品列表信息 POST
  static const String URL_MERCHANTSVERSIONPRODUCT_PRODUCT_LIST =
      "$API_PORTAL/merchantsVersionProduct/productList";

//商品搜索 POST
  static const String URL_MERCHANTSVERSIONPRODUCT_PRODUCT_SEARCH =
      "$API_PORTAL/merchantsVersionProduct/productSearch";

  ///***********************************START 订单 API**************************************///

  ///***********************************END 商家版-数据管理 API****************************************///

  /// 商户版-店铺数据详情  ///
  static const String URL_MERCHANTSDATAANALYSIS_DATAPAGE =
      "$API_PORTAL/MerchantsDataAnalysis/dataPage";

  ///  商户版-店铺数据列表  ///
  static const String URL_MERCHANTSDATAANALYSIS_STORE_DATALIST =
      "$API_PORTAL/MerchantsDataAnalysis/storeDataList";

  ///   商户版-店铺数据列表的状态修改  ///
  static const String URL_MERCHANTSDATAANALYSIS_STORE_EDITESTATUS =
      "$API_PORTAL/MerchantsDataAnalysis/upStoreDataStatus";

  ///   工具栏显示自定义 POST    ///
  static const String URL_MERCHANTSDATAANALYSIS_TOOLBAR_CUSTOMIZATION =
      "$API_PORTAL/MerchantsDataAnalysis/toolbarCustomization";

  ///   工具栏总菜单集合 GET   ///
  static const String URL_MERCHANTSDATAANALYSIS_TOOLBAR_MENU_LIST =
      "$API_PORTAL/MerchantsDataAnalysis/toolbarMenuList";

  ///***********************************END 商家版-数据管理 API****************************************///

  ///***********************************START 商家版 订单 API**************************************///

//订单详情 POST
  static const String URL_MERCHANTSORDER_GET_ORDER_DETAIL =
      "$API_PORTAL/merchantsOrder/getOrderDetail";

//通知取件 POST
  static const String URL_MERCHANTSORDER_NOTIFY_PICKUP =
      "$API_PORTAL/merchantsOrder/notifyPickup";

//改价 POST
  static const String URL_MERCHANTSORDER_CHANGE_PRICE =
      "$API_PORTAL/merchantsOrder/changePrice";

//待发货 订单确认发货 POST
  static const String URL_MERCHANTSORDER_CONFIRM_DELIVERY =
      "$API_PORTAL/merchantsOrder/ConfirmDelivery";

//待发货-待发货扫码交货 POST
  static const String URL_MERCHANTSORDER_SCAN_CODE_DELIVERY =
      "$API_PORTAL/merchantsOrder/scanCodeDelivery";

//订单列表 GET
  static const String URL_MERCHANTSORDER_ORDER_LIST =
      "$API_PORTAL/merchantsOrder/orderList";

//商家版 -订单搜索 GET
  static const String URL_B_ORDER_SEARCH =
      "$API_PORTAL/merchantsOrder/searchOrder";

//订单页显示数据 GET
  static const String URL_MERCHANTSORDER_ORDER_DATA =
      "$API_PORTAL/merchantsOrder/orderData";

//关闭订单 POST
  static const String URL_MERCHANTSORDER_CANCEL_ORDER =
      "$API_PORTAL/merchantsOrder/cancelOrder";

//修改发货地址 POST
  static const String URL_MERCHANTSORDER_UPDATE_DELIVERY_ADDRESS =
      "$API_PORTAL/merchantsOrder/updateDeliveryAddress";

//交付确认页面的订单详情接口 POST
  static const String URL_B_DELI_CONF_ORDER_DETAIL =
      "$API_PORTAL/merchantsOrder/deliveryConfirmation";

//更改商家备注
  static const String URL_MERCHANTSORDER_UPDATE_MERCHANTSNOTE =
      "$API_PORTAL/merchantsOrder/updateMerchantsNote";

//商家端收款确认详情页
  static const String URL_MERCHANTSORDER_PAYMENT_ORDER_DETAIL =
      "$API_PORTAL/merchantsOrder/merchantsTransferOrderDetail";

//商家端收款确认
  static const String URL_MERCHANTSORDER_CONFIRM_PAYMENT =
      "$API_PORTAL/merchantsOrder/confirmPayment";

  ///***********************************END 商家版 订单 API****************************************///

  ///**********************************START 商家版 我的模块 API**************************************///

//获取我的工作台数据
  static const String URL_B_MY_WORKBENCH_DATA =
      "$API_PORTAL/MerchantsDataAnalysis/workbenchHome";

  ///**********************************END 商家版 我的模块 API****************************************///

  ///**********************************START 商家版 物流查询 API**************************************///

//物流查询
  static const String URL_MERCHANTS_LOGISTICS_INFO =
      "$API_PORTAL/MerchantsLogistics/info";

//获取合作物流公司
  static const String URL_MERCHANTS_LOGISTICS_COMBINE_LOGISTICS =
      "$API_PORTAL/MerchantsLogistics/combineLogistics";

  ///**********************************END 商家版 物流查询 API****************************************///

  ///**********************************START 直播 API**************************************///

//创建直播
  static const String URL_MERCHANTS_LIVE_CREATLIVE =
      "$API_VIDEO/live/createLive";

  ///**********************************END 直播 API**************************************///

  ///**********************************START 认证 API**************************************///

// 获取用户认证状态-认证状态（-1未提交认证 0-提交认证，1-认证通过，2-审核失败）
  static const String URL_SSO_GETMEMBERCERT = "$API_PORTAL/sso/getMemberCert";

// 用户认证
  static const String URL_SSO_MEMBERCERT = "$API_PORTAL/sso/memberCert";
  ///**********************************END 认证 API**************************************///

}

class ApiConfig {
  /// code返回 200，http请求成功
  static const int REQUEST_SUCCESS_CODE = 200;

  /// code返回 401，代表用户token失效 暂未登录或token已经过期 ///
  static const int REQUEST_FAILED_CODE_401 = 401;

  /// 没有相关权限 ///
  static const int REQUEST_FAILED_CODE_403 = 403;

  /// 找到地址 ///
  static const int REQUEST_FAILED_CODE_404 = 404;

  /// 操作失败 服务器内部错误 ///
  static const int REQUEST_FAILED_CODE_500 = 500;

  /// 地址已失效 ///
  static const int REQUEST_FAILED_CODE_510 = 510;

  /// 参数检验失败 ///
  static const int REQUEST_FAILED_CODE_512 = 512;

  /// 图片异常 ///
  static const int REQUEST_FAILED_CODE_406 = 406;

  /// 支付宝 支付异常，请重新提交订单！ ///
  static const int REQUEST_FAILED_CODE_701 = 701;

  /// 微信 支付异常，请重新提交订单！ ///
  static const int REQUEST_FAILED_CODE_702 = 702;

  /// 没有商家权限 ///
  static const int REQUEST_FAILED_CODE_10001 = 10001;

  /// 订单 商品异常  ///
  static const int REQUEST_FAILED_CODE_10002 = 10002;

  /// 其他未定义网络错误  ///
  static const int REQUEST_FAILED_CODE_30000 = 30000;
}
